from django.test.testcases import TestCase
from django.template.context import Context
from django.http import HttpResponse

from django_cheetahtemplates import CheetahTemplate


template = """$myvar#slurp
#for i in $range(10)
$i#slurp
#end for
"""

class CheetahTemplateTest(TestCase):
    def test_1(self):
        self.assertEqual(CheetahTemplate(template).render(
            Context({'myvar':'hello world','range':range})),
        'hello world0123456789')